package com.bootdo.core.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.bootdo.core.dao.UserDao2;
import com.bootdo.core.domain.UserDO2;
import com.bootdo.core.service.UserService2;



@Service
public class UserServiceImpl2 implements UserService2 {
	@Autowired
	private UserDao2 userDao2;
	
	@Override
	public UserDO2 get(Long id){
		return userDao2.get(id);
	}
	
	@Override
	public List<UserDO2> list(Map<String, Object> map){
		return userDao2.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return userDao2.count(map);
	}
	
	@Override
	public int save(UserDO2 user){
		//user.setDelFlag("1");
		user.setCreateTime(new Date());
		user.setUpdateTime(new Date());
		return userDao2.save(user);
	}
	
	@Override
	public int update(UserDO2 user){
		return userDao2.update(user);
	}
	
	@Override
	public int remove(Long id){
		return userDao2.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return userDao2.batchRemove(ids);
	}
	
}
